---
title: dub.analytics.clicks.devices
sidebarTitle: Devices
description: Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.
---

import AnalyticsArguments from "/snippets/analytics-arguments.mdx";

<Note>
  Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or
  higher.
</Note>

<AnalyticsArguments />

## Response

<ResponseField name="device" type="string" required>
  The name of the device
</ResponseField>

<ResponseField name="clicks" type="number" required>
  The number of clicks from this device
</ResponseField>

<RequestExample>

```typescript
await dub.analytics.clicks.devices({
  key: "dummy",
  domain: "dub.sh",
  interval: "30d",
});
```

</RequestExample>

<ResponseExample>

```typescript
[
  { device: "Desktop", clicks: 15 },
  { device: "Mobile", clicks: 12 },
];
```

</ResponseExample>
